﻿//-----------------------------------------------------------------------
// <copyright file="IRepositoryFactory.cs" company="FastNET Services">
//     Copyright (c) 2008-2009. All Rights Reserved.
// </copyright>
// <license>
//     GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
//-----------------------------------------------------------------------
#region Usings

using GateShift.Common.Repository.Interfaces.Repositories.Base;

#endregion

//// TODO: Implement Caching of business objects here
//// TODO: Use Windsor to allow switching of data sources

namespace GateShift.Common.Repository.Interfaces.Factories
{
    /// <summary>
    /// Repository Factory Interface for managing Repository Providers
    /// </summary>
    public interface IRepositoryFactory
    {
        /// <summary>
        /// Retrieves a repository for data related actions
        /// </summary>
        /// <typeparam name="T">A <typeparamref name="T"/> based reference to the type of repository needed</typeparam>
        /// <returns>A <typeparamref name="T"/> repository available to use</returns>
        T GetRepository<T>() where T : class, IRepository;
    }
}